package com.wang.study.mapper;

import com.wang.study.model.Category;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface CategoryMapper {
    @Select("select * from mall_category")
    List<Category> findAll();
    @Update("update mall_category set name=#{name},status=#{status} where id=#{id}")
    Integer updateById(@Param("id") Integer id, @Param("name") String name, @Param("status") Integer status);
    @Delete("delete from mall_category where id=#{id}")
    Integer delById(Integer id);
    @Insert("insert into mall_category(id,name,status) values(#{id},#{name},#{status})")
    Integer addCategory(@Param("id") Integer id,@Param("name") String name, @Param("status") Integer status);
}
